package nc.tb.pub.profile;

import junit.framework.TestCase;
import nc.tb.pub.NtbEnv;
import nc.tb.pub.util.NtbLogger;
import nc.vo.pub.BusinessException;

public class TestProfile extends TestCase {
	public void testProfile()throws BusinessException{
		NtbEnv.loadInvokeProxy();
		EntityYearFilter eyf=new EntityYearFilter();
		eyf.setPk_Entities(new String[]{"ENT1","ENT2"});
		eyf.setPk_Years(new String[]{"2006","2007"});
		EntityYearFilter tt=NtbProfile.getInstance().getUserFilter("tzj","3002");
		if(tt==null){
			NtbProfile.getInstance().saveUserFilter("tzj","3002",eyf);
			NtbLogger.print4("NEW ROW");
		}
		tt=NtbProfile.getInstance().getUserFilter("tzj","3002");
		NtbLogger.print4(tt.toDbString());
		
		eyf.setPk_Years(new String[]{"2009","2007"});
		NtbProfile.getInstance().saveUserFilter("tzj","3002",eyf);
		tt=NtbProfile.getInstance().getUserFilter("tzj","3002");
		NtbLogger.print4(tt.toDbString());

	}

}
